<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="/WEB-INF/common/common.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>学院信息-新增</title>
<link href="<%=path %>/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%=path %>/third/jquery-validation-1.14.0/lib/jquery.js"></script>
<script type="text/javascript" src="<%=path %>/js/common.js"></script>
<script type="text/javascript" src="<%=path %>/third/My97DatePicker/WdatePicker.js"></script> 
<script>
var  _contextPath="<%=path%>";
var  _modulePath=_contextPath+"/sys/";

$(document).ready(function(e) {
$(".btn").click(function(){
		_sbmForm(_modulePath+"textures_add.action?view=list","");
		});
});

</script>
<!-- 默认选中驾校名称-开始 -->
<script type="text/javascript">
 $(document).ready(function(){
		$(".school").each(function(){//循环获取所有单位编号 
			var schoolId = $(this).attr("value");
			var school = $("#serviceCarschoolId").attr("value");
			if(schoolId == school){
				$(this).attr("selected","selected");				
		}	
			
		});
	 });
</script>
<!-- 默认选中驾校名称-结束 -->
<!-- 默认选中教练名称-开始 -->
<script type="text/javascript">
 $(document).ready(function(){
		$(".userId").each(function(){//循环获取所有单位编号 
			var userId = $(this).attr("value");
			var user = $("#serviceCarUserId").attr("value");
			if(userId == user){
				$(this).attr("selected","selected");				
		}	
			
		});
	 });
</script>
<!-- 默认选中教练名称-结束 -->
<script type="text/javascript" src="<%= basePath%>third/jquery-validation-1.14.0/dist/jquery.validate.js"></script>
<script type="text/javascript" src="<%= basePath%>third/jquery-validation-1.14.0/dist/localization/messages_zh.js"></script>
<script type="text/javascript">
        $(function(){
			
			//如果是新增成功，会返回1，如果是1，则提示保存成功
			if("1" == "${actionState}"){
				alert('保存成功！');
			}
		 	
            $("#commonform").validate({
            
                errorClass: "errorInfo", //默认为错误的样式类为：error
                focusInvalid: false, //当为false时，验证无效时，没有焦点响应  
                onkeyup: false,   
                submitHandler: function(form){   //表单提交句柄,为一回调函数，带一个参数：form   
					checkFrom();
                    form.submit();   //提交表单   
                },   
                rules:{
                   
                    "academyName":{
                        required:true,
                    }
                },
                messages:{
                    
                    "academyName":{
                        required:"必填",
                    }
                  }
            });    
        }); 
        </script>
</head>

<body>

	<div class="place">
		<span>位置：</span>
		<ul class="placeul">
		     <li><a href="#">首页</a></li>
			<li><a href="#">用户管理</a></li>
			<li><a href="#">新增教师用户</a></li>
		</ul>
	</div>

	<div class="formbody" id="tab1">

		<div class="formtitle">
			<span>新增教师信息</span>
		</div>

		<form action="<%=basePath%>/biz/SysUser_addTeacher.action" method="post" >
			<ul class="forminfo">
			<li><label>用户名</label><input name="userId" id="userId" type="text"  class="dfinput" />
			<li><label>教师姓名</label><input name="userName" id="userName" type="text"  class="dfinput" />
			<li></li><label>性别:</label>  
男<input type="radio" name="userSex" checked="checked"  value="1" />  
女<input type="radio" name="userSex" value="0"/></li> 
			<li><label>研究室</label><!-- <input name="userStudio" id="userStudio" type="text"  class="dfinput" /> -->
			<select name="userStudio"  id ="userStudio" >
   <option value="">-------请选择研究室---------</option>
     <s:iterator value="SerStusdio">
    <option value="${studioName}"  id="studioId"  name="studioId">${studioName}</option>
    </s:iterator>
    </select>
			<li><label>联系方式</label><input name="userPhone" id="userPhone" type="text"  class="dfinput" />
			<li><label>密码</label><input name="userPassword" id="userPassword" type="text"  class="dfinput" />
			</li>
			<br />
			<ul class="forminfo"> <li><label>&nbsp;</label><input name="" type="submit" class="btn" value="确认保存" /></li>
			</ul>
		</form>
	</div>

</body>



</html>
